layui.use("laydate", () => {
    let laydate = layui.laydate;
    //日期时间范围
    laydate.render({
        elem: '#startDate'
        , type: 'datetime'
    });
    laydate.render({
        elem: '#endDate'
        , type: 'datetime'
    });
    let cols = [[
        {type: 'checkbox', fixed: 'left'}
        , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
        , {field: 'teamCode', title: '小组代码', align: 'center'}
        , {field: 'teamName', title: '小组名称', align: 'center'}
        , {field: 'teamLeaderId', hide: true}
        , {field: 'teamLeaderName', title: '组长', sort: true, align: 'center'}
        , {field: 'createTime', title: '创建时间', sort: true, align: 'center'}
        , {field: 'updateTime', title: '更新时间', align: 'center'}
        , {fixed: 'right', title: '操作', toolbar: '#barDemo', width: 300, align: 'center'}
    ]];
    render("groupTable", {
        "query": "/admin/team/query",
        "delete": "/admin/team/delete",
        "batchDelete": "/admin/team/batchDelete",
        "template": "../group/groupUpdate.html",
        "select": {"teamLeaderId": "/admin/team/teamLeaderMap?id"},
    }, "小组", cols, ['20%', '50%']);
});